package com.xunai.saas.example.model.param;

import com.xunai.saas.example.model.enums.PublicEnum;
import lombok.Data;
import org.springframework.util.StringUtils;

import javax.validation.constraints.NotNull;

@Data
public class FindAcupointByParam {

    @NotNull
    private Integer bodyId;

    @NotNull
    private String path;

    private String notifyUrl;

    public String getNotifyUrl() {
        if (!StringUtils.hasLength(notifyUrl)) {
            return PublicEnum.NOTIFY_URL.getKey();
        }
        return notifyUrl;
    }
}
